<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/easypaginate.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>

        <link rel="stylesheet" type="text/css" href="../css/paging.css"/>
        <link rel="stylesheet" type="text/css" href="../css/dropdown.css"/>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){

                //   $j(".sidebar").fancybox().trigger('click');
                $j( ".showMessageBirthday" ).draggable();
                $j(".closeBirthday").live('click',function(){
                    $j(this).parent().hide();
                });
                $j('input#leavedate111').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                $j('input#leavedate112').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                initThickBox('.thickbox');
                $j('input#leavedate1').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#leavedate1a').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#leavedate1b').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#dateStart').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                $j('input#dateEnd').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true });
                   
                $j('.keysearch').live('keyup',function(){
                    if($j('.keysearch').val() == ""){
                        $j('.rich-table-row').show();
                                   
                    }else{
                        $j('.rich-table-row').hide();
                        $j('.rich-table-row').each(function(){
                            html = $j(this).html();
                            if(   ununicode(html).indexOf(  ununicode($j('.keysearch').val()) ) > -1    )  {
                                $j(this).show();
                            }else{
                                $j(this).hide();
                            }
                        });
                    }

                });
                    
                $j('.check_select').live('click',function(){
                    var lang= $j(this).attr("lang");
                    var boool;
                    // alert(lang)               
                    if( $j(this).is(":checked"))
                    {
                        boool = true;
                    }
                    else
                    {
                        boool = false;
                    }
                            
                    $j.post("customerexpand.jsp?action=addCusp100&p100="+lang+"&valueC="+boool,function(data){
                            
                    });
                });
                    
                $j(".checkAll").live("click",function(){
                    
                    flag = $j('.checkAll').is(':checked');
                       
                    $j(".check_select").each(function(){
                        $j('.check_select')  .attr('checked', flag);
                    });
                        
                    var boool;
                    if( $j(this).is(":checked"))
                    {
                        boool = true;
                    }
                    else
                    {
                        boool = false;
                    }
                        
                    $j.post("customerexpand.jsp?action=addAllCusp100&boool="+boool,function(data){
                            
                    });

                });
                    
                $j(".rich-table-row:odd").addClass("odd");
                    
                // Begin Event load ajax form CRM
                $j('.contactN950').live('click',function(){
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();
                    $j(".mesage").text("");
                    $j.post("contactCRM.jsp?action=editajaxpage&pn100="+ pn100KH+"&table=N100", function(data){
                        $j('.customer-boxcontact').html(data);
                    });
                    
                });
                $j('.acountT025').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();         
                    $j.post("accountCRM.jsp?action=editajaxpage&pn100="+pn100KH+"&tv026=N100",function(data){
                        $j('.customer-boxacount').html(data);
                    }) ;
                    
                });
                
                $j('.customerK100').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();  
                    $j.post("customerdemo.jsp?action=editEmp&pn100="+ pn100KH+"&table=formload&pt025=1&itemid=N100", function(data){
                        $j('.customer-boxcustomer').html(data);
                    });
                    
                });
                
                $j('.infoN350').live('click',function(){
                    $j(".mesage").text("");
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val(); 
                    $j.post("passportCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                        $j('.customer-boxN350').html(data);
                    });
                    
                });
                $j('.companyCRM').live('click',function(){
                    object = $j(this).next();
                    var pn100KH = $j('#form-input-customerform\\:pn100').val();   
                    $j.post("companyCRM.jsp?action=editajaxpage&pn100="+ pn100KH, function(data){
                        $j('.customer-companyCRM').html(data);
                    }) ;
                    
                }); 
                   
                // End Event load ajax form CRM for Dashbord
                // Show hide form customerInputExpand from Customer
                $j('.header-box').live('click', function(){ 
                    $j(".mesage").text("");
                    if($j(this).next('.customer-box').css('display') != 'none'){
                        return;
                    }else{
                        var PN100=$j('#form-input-customerform\\:PN100').val();
                        // var PN100 = $j('#formKHCN\\:pn100').val(); 
                        if(PN100 != 0)
                        {
                            $j('.messa').hide();
                            $j('.customer-box').slideUp();                         
                            $j('.boder-bomttom').removeClass('boder-bomttom');
                            $j(this).next('.customer-box').slideDown();
                            $j(this).addClass('boder-bomttom');
                        } else{                        
                            $j('.messa').show();
                            $j(this).next('.customer-box').css('display') != 'none'
                        }
                           
                    }

                });
                // Lịch sử khách hàng
                $j('.loadHistory').live('click',function(){
                    dayss = $j(this).attr('lang');
                    // window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+dayss;
                    $j.post("actionCompany.jsp?action=reloadfordays&dayss="+dayss,function(data){
                        if(data!=null){
                            window.location.href="customerexpandays.jsp?action=reloadfordays&dayss="+dayss;
                        }
                    });
                });
                
               
            });
        </script>

    </head>

    <script type="text/javascript" language="javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
       
            $j( ".sendSMS_person" ).click(function() {
                $j( "#togglesms" ).show();
                $j( "#togglesms" ).animate({height:'auto',opacity:'0.9'},"slow");
                $j( "#togglesms" ).animate({width:'39%',opacity:'0.9'},"slow");
                var info = $j(this).attr('lang');
                $j.post("SgtSMS.jsp?action=send_sms_person&"+info,function(data){
                    if(data!=null){
                        $j( "#togglesms" ).html(data);
                    }
                });
            });
        });
    </script>
    <style>
        .sendSMS_person{
            color: #0055A6;;
            cursor: pointer;
        }
    </style>
    <body>
        <div id="togglesms">

        </div>
        <a4j:form>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <h:outputText value="<div class='permission' lang='#{loginSession.right.MENU_DAB_VIEW}'></div>" escape="false"/>
            <div id="content">
                <div id="menu_top">
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span>Khu vực</span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>

                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <h:panelGroup rendered="#{loginSession.right.DAB_LST_PAR}">
                        <div class="dropdown">
                            <div class="select_choise">
                                <a href="#">
                                    <span class="department2" lang="<h:outputText value="#{n450_n850.fn850}"/>">
                                        <h:outputText rendered="#{n450_n850.fn850 !=0}" value="#{n450_n850.nv851}"/>
                                        <%--      <h:outputText rendered="#{n450_n850.fn850 ==0}" value="Tất cả"/> --%>
                                    </span>
                                </a>

                            </div>
                            <div class="select_hidden departmentlistN850">

                                <ul>
                                    <%--   <li><a href="#"><span class="department3" lang="<h:outputText value="0"/>">
                                                   <h:outputText value="Tất cả"/>
                                               </span></a></li>     --%>                             


                                    <a4j:repeat value="#{n450_n850.listComb850}" var="item">
                                        <li><a href="#"><span class="department2" lang="<h:outputText value="#{item.value}"/>">
                                                    <h:outputText value="#{item.label}"/>
                                                </span></a></li> 
                                            </a4j:repeat>
                                </ul>
                            </div>
                        </div>
                    </h:panelGroup>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;"
                         class="imgFancybox">
                        <h:outputLink rendered="#{loginSession.right.DAB_LST_CRE}"   value="customerInputExpand.jsp?flagform=1&flagexpand=false&height=453&amp;width=741&amp;modal=true" styleClass="fancybox">
                            <span><h:graphicImage value="../../images/spTour.png" title="#{locale.addCustomer}"/></span>
                        </h:outputLink>


                    </div>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;"  class="imgFancybox">
                        <h:panelGroup rendered="#{loginSession.right.DAB_LST_STI}">
                            <h:outputLink value="reportNStatic.jsp">
                                <h:graphicImage value="../../images/thong-ke.png" title="Thống kê"/>
                            </h:outputLink>
                        </h:panelGroup>
                    </div>
                    <div style="float:left;margin-left: 2px;margin-right: 2px;">
                        <div class="sidebar_row2" style="margin-bottom: 0;">
                            <h:panelGroup>

                                <div class="sidebar" style="width:0%;">
                                    <div class="sidebar_search">

                                    </div>
                                    <div class="search_boxnew" style="display:none;">
                                        <rich:tabPanel switchType="client">
                                            <rich:tab label="Thống kê theo ngày">
                                                <div style="width:100%;float: left;margin-top: 5px;margin-bottom: 5px;">
                                                    <a4j:outputPanel layout="block">
                                                        <rich:calendar  value="#{customerExpand.dateStatus}" id="calendar" locale="US" popup="true" datePattern="dd/MM/yyyy" showApplyButton="false" cellWidth="24px" cellHeight="21px">
                                                        </rich:calendar>
                                                    </a4j:outputPanel>
                                                </div>
                                                <div style="width:100%;float: left;">
                                                    <a4j:outputPanel layout="block">
                                                        <rich:calendar  value="#{customerExpand.endDateSta}" id="calendar1" locale="US" popup="true" datePattern="dd/MM/yyyy" showApplyButton="false" cellWidth="24px" cellHeight="21px">
                                                        </rich:calendar>
                                                    </a4j:outputPanel>
                                                </div>
                                                <div style="width:100%;float: left;margin-top: 5px;margin-bottom: 5px;">
                                                    <a4j:commandButton style="width:35px;" onclick="showPleaseWait();" oncomplete="hidePleaseWait();"  actionListener="#{customerExpand.reloadfordata}" value="Tìm" >

                                                    </a4j:commandButton></div>
                                                </rich:tab>
                                            </rich:tabPanel>

                                    </div>
                                </div>
                            </h:panelGroup>
                        </div>
                    </div>
               <%--     <div style="float:left;margin-right: 2px;margin-left: 2px;"  class="imgFancybox">
                        <h:panelGroup rendered="#{loginSession.right.DAB_LST_PER}">
                            <div class="fillterby">

                                <h:panelGroup id="daysss">   
                                    <div class="dropdownby">
                                        <div class="select_choise showdatafor" >
                                            <h:panelGroup  rendered="#{customerExpand.dayss==0}"><img src="../images/icon_list.png" alt="Thêm vào tour" title="Danh sách khách hàng" /></h:panelGroup>
                                            <h:panelGroup rendered="#{customerExpand.dayss==1}"><img src="../images/icon_list.png" alt="Thêm vào tour" title="Danh sách 1 ngày" /></h:panelGroup>
                                            <h:panelGroup rendered="#{customerExpand.dayss==3}"><img src="../images/icon_list.png" alt="Thêm vào tour" title="Danh sách 3 ngày" /></h:panelGroup>
                                            <h:panelGroup rendered="#{customerExpand.dayss==7}"><img src="../images/icon_list.png" alt="Thêm vào tour" title="Danh sách 1 tuần" /></h:panelGroup>
                                            <h:panelGroup rendered="#{customerExpand.dayss==30}"><img src="../images/icon_list.png" alt="Thêm vào tour" title="Danh sách 1 tháng" /></h:panelGroup> 
                                        </div>
                                        <div class="showdatafor1">
                                            <div style="width:100%;float: left;"><h:graphicImage style=" cursor: pointer;float:right;" styleClass="clickShow" value="../images/delete.png"/></div>

                                        </div>
                                        <div class="select_hidden">
                                            <ul>
                                                <li class="loadHistory" lang="0"><a href="#"><span><h:outputText value="Danh sách KH"/></span></a></li>
                                                <li class="loadHistory" lang="1"><a href="#"><span><h:outputText value="Danh sách 1 ngày"/></span></a></li>
                                                <li class="loadHistory" lang="3"><a href="#"><span><h:outputText value="Danh sách 3 ngày"/></span></a></li>
                                                <li class="loadHistory" lang="7"><a href="#"><span><h:outputText value="Danh sách 1 tuần"/></span></a></li>
                                                <li class="loadHistory" lang="30"><a href="#"><span><h:outputText value="Danh sách 1 tháng"/></span></a></li>
                                            </ul>

                                        </div>
                                    </div>
                                </h:panelGroup >    
                            </div>
                        </h:panelGroup>
                    </div> --%>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;"  class="imgFancybox">
                        <h:panelGroup rendered="#{loginSession.right.DAB_LST_MAL}">
                            <h:outputLink style="color:#fff;"   value="popUpSendEmail.jsp?page=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  >
                                <img src="../images/icon_email1.png" alt="Email" title="Gửi email"/>
                            </h:outputLink>
                        </h:panelGroup>
                    </div>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;"  class="imgFancybox">
                        <img class="sendSMS_person" lang="page=customerexpand.jsp&group=0" src="../images/viewSMS.png" alt="SMS" title="Xác nhận  SMS"/>
                    </div>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;"  class="imgFancybox">
                        <h:outputLink rendered="#{loginSession.right.EMP_LST_HOL}" value="employeeCalender.jsp?action=datetoday&pageString=datetoday1&type=0">
                            <img style="float: left; " src="../images/nghiphep1.png" title="Nghỉ phép"/>
                        </h:outputLink>

                    </div>
                    <h:panelGroup rendered="#{loginSession.right.DAB_LST_PAR}">
                        <div class="cbxEmp"> 
                            <h:inputHidden value="#{customerExpand.loginEmp}"/>                                
                            <a4j:region>
                                <h:selectOneMenu style="height:26px;margin-left:3px;"  value="#{customerExpand.loginEmp}" styleClass="cbx_editEmp" id="ckb_098">
                                    <f:selectItems value="#{customerExpand.lstEmpByID}" />
                                    <a4j:support event="onchange"  reRender="table, daysss"  actionListener="#{customerExpand.reloadlist}" onsubmit="showPleaseWait();" oncomplete="hidePleaseWait();" > 

                                    </a4j:support>
                                </h:selectOneMenu>
                            </a4j:region>
                        </div>
                    </h:panelGroup>
                    <div class="groupcontanersearch">
                        <h:inputText value="#{customerExpand.keySearch}" style="  float: left;height: 25px; margin-left: 0;width: 86%;" onfocus="if(this.value=='#{customerExpand.keySearch}')this.value='';" styleClass="keysearch" />                         
                        <div style="float:left;" class="buttonsearch">
                            <div class="group cssgroup">
                                <h:selectOneRadio layout="pageDirection" value="#{customerExpand.typesearch}" styleClass="feild_sex"  style="margin-left:5px; margin-top:14px; padding:15px; width:195px; height:153px;">
                                    <f:selectItem itemValue="0" itemLabel="#{locale.all}" />
                                    <f:selectItem itemValue="1" itemLabel="#{locale.company}"/>
                                    <f:selectItem itemValue="2" itemLabel="#{locale.telephone}"/>
                                    <f:selectItem itemValue="3" itemLabel="#{locale.frist_lastname}"/>
                                    <f:selectItem itemValue="4" itemLabel="#{locale.person_info}"/>
                                    <f:selectItem itemValue="5" itemLabel="#{locale.email}"/>
                                    <f:selectItem itemValue="6" itemLabel="#{locale.tour}"/>
                                    <f:selectItem itemValue="7" itemLabel="MSKH"/>
                                </h:selectOneRadio>
                                <h:commandButton      action="#{customerExpand.reload}" value="#{locale.search}" style="margin-left:75px; margin-top:5px;" styleClass="buttonsearch2">
                                </h:commandButton>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="content_detail">
                    <div class="content_right">
                        <div class="content">

                           

                                <div class="content-dashboard">
                                    <rich:dataTable value="#{customerExpand.listgetrow}" var="cus"
                                                    rows="50"
                                                    width="100%"
                                                    columnClasses=",columns,columns,columns" rowKeyVar="row"
                                                    id="table" styleClass="machinePosDataTable">
                                          <rich:column width="2%" style="text-align:center">
                                            <f:facet name="header">
                                               <h:outputText value="STT" />
                                            </f:facet>
                                            <div style="width: 100%">
                                               <h:outputText value="#{row+1}" />
                                            </div>
                                        </rich:column>           
                                        <rich:column width="3%" style="text-align:center">
                                            <f:facet name="header">
                                                <h:selectBooleanCheckbox rendered="#{loginSession.right.DAB_CHE_ALL}" styleClass="checkAll" />
                                            </f:facet>
                                            <div style="width: 100%">
                                                <h:selectBooleanCheckbox rendered="#{loginSession.right.DAB_CHE_ONL}" value="#{cus.selected}" styleClass="check_select" lang="#{cus.pn100}"/>
                                            </div>
                                        </rich:column>
                                        <rich:column width="10%" style="text-align:center">
                                            <f:facet name="header">
                                                <h:outputText value="Chức năng" />
                                            </f:facet>
                                            <div style="width:100%;">
                                                <!-- <img  height="12px" src="../images/docs_icon.png" alt="History"  title="History" />-->
                                                <h:outputLink rendered="#{loginSession.right.DAB_LST_WCI}"  value="workChargeDashInput.jsp?action=addDash&pn100=#{cus.pn100}&fk100=#{cus.fk100}&page=customerExpand.jsp&height=300px&width=500px" styleClass="fancybox">
                                                    <img src="../images/workcharge.png" alt="CH" title="Chăm sóc khách hàng" style="padding-right:4px;"/>
                                                </h:outputLink>

                                                <h:outputLink rendered="#{loginSession.right.DAB_LST_HIS}" value="tourjoin.jsp?pn100=#{cus.pn100}&KeepThis=true&amp;TB_iframe=true&amp;height=453&amp;width=941&amp;modal=true" styleClass="thickbox add_new" id="thickbox2"  style="cursor:pointer" >
                                                    <img  height="15px" width="15px" src="../images/08.png" alt="History"  title="History" />
                                                </h:outputLink>
                                                <h:outputLink rendered="#{loginSession.right.DAB_LST_MOD}"  value="customerInputExpand.jsp?pn100=#{cus.pn100}&fk100=#{cus.fk100}&action=edit&height=300px&width=500px&flagform=1" styleClass="fancybox">
                                                    <img src="../images/edit.png" alt="edit" title="edit"/>
                                                </h:outputLink>
                                            </div>
                                        </rich:column>
                                        <rich:column width="12%">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.frist_lastname}" />
                                            </f:facet>
                                            <div style="width:100%;">
                                                <h:outputLink value="customer.jsp?action=linkCus&pnPN100=#{cus.pn100}&type=#{cus.ni104}"> <h:outputText value="#{cus.hoten}"/></h:outputLink>
                                            </div>
                                        </rich:column>
 
                                        <rich:column width="10%" style="text-align:left;">
                                            <f:facet name="header">
                                                <h:outputText value="Trạng thái"/>
                                            </f:facet>
                                            <div style="width:100%;">
                                                <h:outputText value="#{cus.kv331}"/>
                                            </div>
                                        </rich:column>


                                        <rich:column width="13%" styleClass="email">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.email}" />
                                            </f:facet>

                                            <div style="width:100%;">

                                                <h:outputLink value="popupSendMailPerson.jsp?page=customerexpand&idx=#{cus.pn100}&mailx=#{cus.nv105}&typex=customerexpand&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  ><h:outputText value="#{cus.nv105}" /></h:outputLink>
                                            </div>
                                        </rich:column>
                                        <rich:column width="6%">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.telephone}" />
                                            </f:facet>

                                            <div style="width:100%;">

                                                <h:outputText value="#{cus.nv958}" styleClass="sendSMS_person" lang="page=customerexpand.jsp&group=1&hoten=#{cus.hoten1}&phone=#{cus.nv958}&fn100=#{cus.pn100}"/>

                                                <%--    <h:outputLink  value="viewSMSTemplateBir.jsp?action=sendSMSbir&hoten=#{cus.hoten}&phone=#{cus.nv958}&fn100=#{cus.pn100}">
                                                        <h:outputText value="#{cus.nv958}"/>
                                                    </h:outputLink>
                                                    <a href="sendSMS.jsp?action=sendSMS&redirect=customerexpand&hoten=<h:outputText value="#{cus.hoten}" />&pn100=<h:outputText value="#{cus.pn100}" />&phone=<h:outputText value="#{cus.nv958}" />" class="fancybox actionsendsms"> <h:outputText value="#{cus.nv958}" styleClass="phone" lang="#{cus.nv958}"/> </h2> <h:outputText rendered="#{cus.nv958=='' ||  cus.nv958== null}" value="<br/>" escape="false"/></a></h2>--%>

                                            </div>
                                        </rich:column>
    
                                        <rich:column width="10%" >
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.company}" />
                                            </f:facet>
                                            <div style="width:100%;">
                                                <h:outputLink value="cuscompany.jsp?action=linkCom&pnPK100=#{cus.fk100}&type=#{cus.kn114}"><h:outputText value="#{cus.subKv103}" title="#{cus.kv103}" /></h:outputLink>
                                            </div>
                                        </rich:column>
                                        <rich:column width="15%">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.address}" />
                                            </f:facet>
                                            <div style="width: 100%">
                                                <h:outputText value="#{cus.subNv112}" title="#{cus.nv112}" />
                                            </div>
                                        </rich:column>
                                        <rich:column width="15%">
                                            <f:facet name="header">
                                                <h:outputText value="Cập nhật" />
                                            </f:facet>
                                            <div style="width: 100%">
                                                <h:outputText value="#{cus.nl148}</br>#{cus.nl149}" escape="false" />
                                            </div>
                                        </rich:column>


                                    </rich:dataTable>
                                </div>
                                <div style="float: right;color: red;">
                                    Tổng số KH trong ngày : <h:outputText value="#{customerExpand.rowdemo}"/>
                                </div>
                           
                            <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                             height="30" width="40" zindex="2000">
                                <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                            </rich:modalPanel>
                            <h:inputHidden value="#{customerExpand.charSearch}" />

                        </div>
                    </div>
                </div>
            </div>
        </a4j:form>

    </body>
</html>
<script type="text/javascript" language="javascript">
    var open_cur = 0;
    $j = jQuery.noConflict();
    $j(document).ready(function(){
    
        $j(".department2").live("click",function(){
                    
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            //   showPleaseWait(); 
            dayss = $j('.loadHistory').attr('lang');
            emp =  $j('.cbx_editEmp').children("option:selected").val();
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850+"&emp="+emp,function(data){
                if(data!=null){ 
                    window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
                
        $j(".department3").live("click",function(){
            //                     alert("department3");
            emp =  $j('.cbx_editEmp').children("option:selected").val();
            fh200 = $j(".donvi").attr("lang");
            fn850 = $j(this).attr("lang");
            fn450 = $j(".department1").attr("lang");
            dayss = $j('.loadHistory').attr('lang');
            // showPleaseWait(); 
            $j.post("N450_N850.jsp?&action=group&fh200="+fh200+"&fn450="+fn450 +"&fn850="+fn850+"&emp="+emp,function(data){
                if(data!=null){ 
                    window.location.href="customerexpand.jsp?action=reloadfordays&dayss="+0+"&flagFN850=10";
                    //       hidePleaseWait();        
                }
            }); 
        });
        $j('.search_boxnew').hide();       
        $j('.sidebar_search').live('click',function(){
            $j('.search_boxnew').hide();
            if($j(this).next().hasClass('active')){

                $j('.search_boxnew').removeClass('active');
            }else{

                $j('.search_boxnew').removeClass('active');
                $j(this).next().addClass('active');
                $j(this).next().show();
            }
        });
        $j(".content_right").live("click",function(){
            $j('.search_boxnew').hide();
        });
    });
</script>

<style type="text/css">
    #footer{
        width: 100%;
    }
    #menu_top{

        width: 100%;
    }

    #content_detail {
        float: left;
        width: 100%;
    }
    #main{
        width:100%;
    }


    #content {
        background: none repeat scroll 0 0 #FFFFFF;
        margin-left: 0.7%;
        width: 98.8%;
    }

    #fancybox-wrap{

    }
    .fields_input{
        float: left;
        margin-top:4px;
        width: 100%;
    }
    .button-link{
        border:0;
        background:url(../images/bg_submit.gif) repeat-x;
        width:134px;
        float:right;
        margin:19px 0 10px 0;
        color:#ffffff;
        font-size:14px;
        font-weight:bold;
        cursor:pointer;
        border-radius:5px;
        box-shadow:0 2px 3px #666666;
        padding:8px 0;
        text-transform:uppercase;
    }
    .customer-box{
        float:left; width:604px; margin-left:25px;
        border:1px solid #CCCCCC;
        padding:18px 0px 10px 0px;
        background: #E5E8EA;
        border-top: none;

    }
    .customer-box label{
        width:90px;
        text-align: right;
        float:left;
    }
    input{
        float:left;
        margin-left:9px;
    }
    /*                    select{
                            float:left;
                            height: 21px;
                            width:166px;
                            margin-left:9px;
                        }*/
    .ui-datepicker-header select{
        width:45% !important;
    }
    .header-box{
        margin-left:25px;
        color:#263340;
        margin-top:10px;
        float: left;
        cursor:pointer;
        padding:4px 0px 0px 4px; 
        width:600px;
        border:1px solid #CCCCCC;
        font-size:12px;
        background: #D4D7D8;
        height: 21px;
        font-weight: bold;
    }
    .fixdate .ui-datepicker-trigger  { margin-left: 4px;}

    .boder-bomttom{

    }

    .mail_sms{
        float: right;
        margin-right: -19px;
        margin-top: 5px;
    }
    .buttonsms {
        /*  background: url("../images/button_left.gif") repeat-x scroll 0 0 transparent; */
        border: 0 none;
        color: white;
        cursor: pointer;
        float: right;
        font-size: 10px;
        font-weight: bold;                
        margin-right: 7px !important; 
        text-transform: uppercase;
        margin-top: -13px;
        width: auto;
    }
    .buttonsms span img{
        height: 23px !important; 
        width: 23px !important; 
    }
    .mesage{
        color: red;
        float: left;
        margin-left: 252px;
        margin-top: 20px;
        text-transform: uppercase;

    }
    .btnsend{
        margin-bottom: 5px;
        margin-right: 1px;
    }
    .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}

    .content-dashboard{
        overflow: auto;
    }
    .cbxEmp {
        float: right;
    }
    .lbl_cbxEmp{
        float:left;
    }
    .cbx_editEmp{
        float:left;
    }
    .content_right .content{
        margin-top: 10px;
    }
    #header_content{
        width: 84% !important;
    }
    .showMessageBirthday{
        border-radius: 5px 5px 5px 5px;
        border: 1px solid gray;
        float: left;
        margin-left: 83.5%;
        margin-top: 16.6%;
        position: absolute;
        width: 215px;
        z-index: 999;
        background-color:white;

    }
    .headershowb{
        border-radius: 5px 5px 0px 0px;
        width: 100%;
        background-color:#303C49;
        height: 25px;
    }
    .closeBirthday{
        float: right;
        margin-left: 201px;
        margin-top: -38px;
        position: absolute;
        z-index: 9999;
        cursor: pointer;
    }
    .itemdiv{
        background-color: white;
        width: 100%;
        border-bottom: 1px solid gray;
        height: 25px;
        line-height: 25px;
    }

    .itemMessage1{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage2{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage3{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemMessage4{
        width: 100%;
        float: left;
        background-color: #9BA3AA;
        line-height: 25px;
        text-align: center;
        cursor: pointer;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
        margin-top: 1px;
    }
    .itemdivA{
        float: left;
        width: 100%;
    }
    .itemdivB{
        float: left;
        width: 100%;
    }
    .itemdivC{
        float: left;
        width: 100%;
    }
    .itemdivD{
        float: left;
        width: 100%;
    }
    .menutop img{
        height: 25px !important;
        width: 25px !important;
    }
    .menutop{
        margin-top: 0.4%;
    }

    .showdatafor{
        cursor: pointer;
    }
    .showdatafor1{
        background-color: #fff;
        display: none;position: absolute;z-index: 9999;width: 169px;height: 132px;
        border: 1px solid #567676;
    }
    #togglesms {
        background: none repeat scroll 0 0 #226579;
        float: left;
        right: 0px;
        margin-top: 100px;
        position: absolute;
        z-index: 999;
        border-radius: 3px;
        border: 1px solid #53B4BF;
    }
    .imgFancybox img{
        height: 26px;
        width: 26px;
    }
    .cssgroup {
        background: none repeat scroll 0 0 #2B3844;
        color: white;
        display: none;
        height: 213px;
        margin-left: -8%;
        margin-top: 2.7%;
        position: absolute;
        width: 150px;
        z-index: 999;
    }

    .sidebar_search {
        background: url("../images/searchnew.png") no-repeat scroll 100% 0 transparent;
        border: 0 none;
        cursor: pointer;
        height: 26px !important;
        margin-top: 0;
        padding-right: 31px;
    }
</style>